home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_geomview.idb / usr / freeware / info / geomview-5.z / geomview-5
Encoding:
Text File  |  1999-01-26  |  41.6 KB  |  1,032 lines

  1. Info file: geomview,    -*-Text-*-
  2. produced by texinfo-format-buffer
  3. from file: geomview.tex
  4.  
  5.  
  6. 
  7. File: geomview  Node: Non-Euclidean Geometry, Prev: Gcl Reference, Up: Top, Next: Mathematica
  8.  
  9. Non-Euclidean Geometry
  10. **********************
  11.  
  12. Geomview supports hyperbolic and spherical geometry as well as
  13. Euclidean geometry.  The three buttons at the bottom of the *Main*
  14. panel are for setting the current geometry type.
  15.  
  16. In each of the three geometries, three models are supported:
  17. *Virtual*, *Projective*, and *Conformal*.  You can
  18. change the current model with the *Model* browser on the
  19. *Camera* panel.  Each Geomview camera has its own model setting.
  20.  
  21. The default model is all three spaces is *Virtual*.  This
  22. corresponds to the camera being in the same space as, and moving under
  23. the same set of transformations as, the geometry itself.
  24.  
  25. In Euclidean space *Virtual* is the most useful model.
  26. The other models were implemented for hyperbolic and spherical
  27. spaces and just happen to work in Eucldiean space as well:
  28. *Projective* is the same as *Virtual* but by default
  29. displays the unit sphere, and *Conformal* displays everything
  30. inverted in the unit sphere.
  31.  
  32. In hyperbolic space, the *Projective* model setting gives a view
  33. of the projective ball model of hyperbolic 3-space imbedded in Euclidean
  34. space.  The camera is initially outside the unit ball.  In this model,
  35. the camera moves by Euclidean motions and geometry moves by hyperbolic
  36. motions.  *Conformal* model is similar but shows the conformal
  37. ball model instead. 
  38.  
  39. In spherical space, the *Projective* model gives a view of half
  40. of the 3-sphere imbedded in Euclidean 3-space.  Spherical motions give
  41. rise to projective transformations in the *Projective* model, and
  42. to
  43. Moebius
  44. transformations in the *Conformal* model.  In both of these
  45. models the camera moves by Euclidean motions.
  46.  
  47. In *Projective* and *Conformal* models, the unit sphere is
  48. drawn by default.  You can turn it off and on at will using the
  49. *Draw Sphere* button in the *Camera* panel.  In the
  50. *Conformal* model, polygons and edges are subdivided as necessary
  51. to make them look curved.  The parameters which determine this
  52. subdivision can be set with the `set-conformal-refine' gcl command.
  53.  
  54. There are several sample hyperbolic space objects in the
  55. `data/geom/hyperbolic' subdirectory of the Geomview directory
  56. (`/u/gcg/ngrap/data/geom/hyperbolic' on the Geometry Center's
  57. system).  Likewise, the subdirectory `data/geom/spherical'
  58. contains several sample spherical space objects.
  59.  
  60. 
  61. File: geomview  Node: Mathematica, Prev: Non-Euclidean Geometry, Up: Top, Next: OOGL.m
  62.  
  63. Mathematica Graphics in Geomview or RenderMan
  64. *********************************************
  65.  
  66. Geomview comes with some Mathematica packages that let you use use
  67. Geomview to display Mathematica graphics.  Mathematica is a commercial
  68. mathematical software system available from Wolfram Research, Inc.
  69.  
  70. There are two ways to do this.
  71.   1. Use Mathematica to write a graphics object to a file in OOGL format
  72.      or in RIB format.
  73.   2. Use Geomview as the default display for all 3D graphics output in
  74.      Mathematica.
  75. You can also use these packages to save Mathematica graphics in
  76. RenderMan (RIB) format.
  77.  
  78. Since the format of Mathematica graphics objects is different from the
  79. OOGL formats, both of these methods involve translating Mathematica
  80. graphics to OOGL format.  Geomview is distributed with a Mathematica
  81. package which does this translation.  Before doing either of the
  82. above you must install this package.
  83.  
  84. * Menu:
  85.  
  86. * OOGL.m::        Generating OOGL files in Mathematica.
  87. * Geomview.m::        Geomview as Mathematica's Default 3D Display.
  88. * RenderMan::        Generating RenderMan files in Mathematica.
  89. * Remote Display::    Using Geomview and Mathematica on different computers.
  90. * Package Details::    Some details about the packages.
  91. * Package Installation::  Installing the Mathematica->Geomview package.
  92.  
  93. 
  94. File: geomview  Node: OOGL.m, Prev: Mathematica, Up: Mathematica, Next: Geomview.m
  95.  
  96. Using Mathematica to generate OOGL files
  97. ========================================
  98.  
  99. The package `OOGL.m' allows Mathematica to write graphics objects in
  100. OOGL format.  To use it, give the command `<< OOGL.m' to Mathematica to
  101. load the package.  The `WriteOOGL[FILE,GRAPHICS]' command writes an OOGL
  102. description of the 3D graphics object GRAPHICS to the file named FILE.
  103.  
  104. This package also provides the `Geomview' command which sends a
  105. 3D graphics object to Geomview.  The first time you use this command
  106. it starts up a copy of Geomview.  Later calls send the graphics to the
  107. same Geomview.  There are two ways to use the `Geomview' command.
  108.  
  109. `Geomview[GRAPHICS]'
  110.      Sends the 3D graphics object GRAPHICS to Geomview as a geom named
  111.      `Mathematica'.  Subsequent usage of `Geomview[GRAPHICS]'
  112.      replaces the `Mathematica' object in Geomview with the new
  113.      GRAPHICS.
  114.  
  115. ``Geomview[NAME,GRAPHICS]''
  116.      Sends the 3D graphics object GRAPHICS to Geomview as a geom named
  117.      NAME.  You can use multiple calls of this form with different
  118.      names to cause Geomview to display several Mathematica objects at once
  119.      and allow independent control over them.
  120.      % math
  121.      Mathematica 2.0 for SGI Iris
  122.      Copyright 1988-91 Wolfram Research, Inc.
  123.       -- GL graphics initialized --
  124.  
  125.      In[1] := <<OOGL.m
  126.  
  127.      In[2] := Plot3D[Sin[x + Sin[y]], {x,-2,2},{y,-2,2}]
  128.  
  129.      Out[2] := -Graphics3D-
  130. This displays graphics in the usual Mathematica way here.
  131.      In[3] := WriteOOGL["math.oogl", %2]
  132.  
  133.      Out[3] := -Graphics3D-
  134. This displays nothing new but writes the file `math.oogl'.
  135. You can now load that file into Geomview on any computer.  Alternately,
  136. you can use the `Geomview' command to start up a copy of Geomview
  137. from within Mathematica.
  138.      In[5] := Geomview[%2]
  139.  
  140.      Out[5] := -Graphics3D-
  141.  
  142.  
  143. 
  144. File: geomview  Node: Geomview.m, Prev: OOGL.m, Up: Mathematica, Next: RenderMan
  145.  
  146. Using Geomview as Mathematica's Default 3D Display
  147. ==================================================
  148.  
  149. The package `Geomview.m' arranges for Geomview to be the
  150. default display program for 3D graphics in Mathematica.  To
  151. load it, give the command `<< Geomview.m' to Mathematica.
  152. Thereafter, whenever you display 3D graphics with `Plot3D'
  153. or `Show', Mathematica will send the graphics to Geomview.
  154.  
  155. Loading `Geomview.m' implicitly loads `OOGL.m' as well, so you
  156. can use the `Geomview' and `WriteOOGL' as described above
  157. after loading `Geomview.m'.  You do not have to separately load
  158. `OOGL.m'.
  159.      % math
  160.      Mathematica 2.0 for SGI Iris
  161.      Copyright 1988-91 Wolfram Research, Inc.
  162.       -- GL graphics initialized --
  163.  
  164.      In[1] := <<Geomview.m
  165.  
  166.      In[2] := Plot3D[x^2 + y^2, {x, -2, 2}, {y, -2, 2}]
  167.  
  168.      Out[2] := -SurfaceGraphics-
  169. This invokes geomivew and loads the graphics object into it.
  170.      In[3] := Plot3D[{x*y + 6, RGBColor[0,x,y]}, {x,0,1}, {y,0,1}]
  171.  
  172.      Out[3] := -SurfaceGraphics-
  173. This replaces the previous Geomview object by the new object. 
  174.      In[4] := Geomview[{%2,%3}]
  175.  
  176.      Out[4] := {-SurfaceGraphics-, -SurfaceGraphics-}
  177. This displays both objects at once.  You also can have more than one
  178. Mathematica object at a time on display in Geomview, and have separate
  179. control over them, by using the `Geomview' command with a name,
  180. *Note OOGL.m::.
  181.      In[5] := Graphics3D[ {RGBColor[1,0,0], Line[{ {2,2,2},{1,1,1} }] }]
  182.  
  183.      Out[5] := -Graphics3D-
  184.  
  185.      In[6] := Geomview["myline", %5]
  186. This addes the `Line' specified in `In[5]' to the existing
  187. Geomview display.  It can be controlled independently of the
  188. "Mathematica" object, which is currently the list of two plots.
  189.      In[7] := <<GL.m
  190. If you're on an SGI, loading `GL.m' returns Mathematica to its
  191. usual 3D graphics display.  To do this on a NeXT you should load
  192. `PSDirect.m' if you are using Mathematica in a notebook, or
  193. `NeXT.m' if you invoked Mathematica from a shell.  The following
  194. plot will appear in a normal static Mathematica window.
  195.      In[8] := ParametricPlot3D[{Sin[x],Sin[y],Sin[x]*Cos[y]}, {x,0,Pi},{y,0,Pi}]
  196.  
  197.      Out[8] := -Graphics3D-
  198. We can return to Geomview graphics at any time by reloading `Geomview.m'.
  199.      In[9] := <<Geomview.m
  200.  
  201.      In[10] := Show[%8]
  202.  
  203.      Out[10] := -Graphics3D-
  204.  
  205.      In[11] := ParametricPlot3D[
  206.             {(2*(Cos[u] + u*Sin[u])*Sin[v])/(1 + u^2*Sin[v]^2),
  207.             (2*(Sin[u] - u*Cos[u])*Sin[v])/(1 + u^2*Sin[v]^2),
  208.             Log[Tan[v/2]] + (2*Cos[v])/(1 + u^2*Sin[v]^2)},
  209.            {u,-4,4},{v,.01,Pi-.01}]
  210.  
  211.      Out[11] := -Graphics3D-
  212. This last plot is Kuen's surface, a surface of constant negative
  213. curvature.  Parametrization from Alfred Gray's *Modern Differential
  214. Geometry of Curves and Surfaces* textbook.
  215.  
  216. 
  217. File: geomview  Node: RenderMan, Prev: Geomview.m, Up: Mathematica, Next: Remote Display
  218.  
  219. Using Mathematica to generate RenderMan files
  220. =============================================
  221.  
  222. In addition to the `WriteOOGL' and `Geomview' commands
  223. described above, the package `OOGL.m' also defines the command
  224. `WriteRIB' which writes a 3D graphics object to a RenderMan RIB
  225. file:  `WriteRIB[FILE, GRAPHICS]' writes GRAPHICS
  226. to file FILE.  RenderMan is a commercial rendering system available
  227. from Pixar, Inc., which can produce extremely high quality images.
  228.      In[1] := <<OOGL.m
  229.  
  230.      In[2] := <<Graphics/Polyhedra.m
  231.  
  232.      In[3] := Graphics3D[Cube[]]
  233.  
  234.      Out[3] := -Graphics3D-
  235.  
  236.      In[4] := WriteRIB["cube.rib", %3]
  237.  
  238.      Out[4] := -Graphics3D- This generates the file `math.rib'.  This is
  239. a ready-to-render RIB file of the given geometry, using a default camera
  240. position, lighting, and the "plastic" shader. In a shell window, type
  241. `render cube.rib' to generate the image file `mma.tiff'. Of course, you
  242. need to have RenderMan installed for this to work. A shortcut to render
  243. from inside Mathematica is `WriteRIB["!render", foo]'.
  244.  
  245. `WriteRIB' works by first converting the Mathematica graphics
  246. object to OOGL format using `WriteOOGL' and then calls an external
  247. program `oogl2rib' to convert OOGL to RIB format.  The
  248. oogl2rib program takes several options which you can specify in a
  249. string as an optional third argument to `WriteRIB'.  The default
  250. option string is `" -n mma.tiff "', which indicates that the RIB
  251. file should generate a rendered TIFF file named `mma.tiff'.  A
  252. particularly useful option is `-g', which tells oogl2rib to
  253. convert only the geometry into a RIB fragment. You can insert that
  254. fragment into a full RIB file of your own making with camera positions
  255. and shaders of your choice, to harness the full power of RenderMan.
  256.  
  257. The full usage of oogl2rib is:
  258.      oogl2rib [-n NAME] [-B R,G,B] [-w WIDTH] [-h HEIGHT] [-fgb] [INFILE] [OUTFILE]
  259. By default it reads from stdin and writes to stdout.
  260. Either INFILE or OUTFILE may be `-', which means
  261. use stdin/stdout.  The options are:
  262.  
  263. `-n NAME'
  264.      Use NAME for the name of the rendered TIFF file (default
  265.      "geom.tiff") or framebuffer window (default "geom.rib").
  266.  
  267. `-B R,G,B'
  268.      Use background color (R,G,B).  Each component ranges
  269.      from 0 to 1. Default: none.
  270.  
  271. `-w WIDTH -h HEIGHT'
  272.      Rendered frame will be WIDTH by HEIGHT pixels.
  273.  
  274. `-f'
  275.      RIB file renders to on-screen framebuffer instead of TIFF file.
  276.  
  277. `-g'
  278.      Output only the geometry in RIB format.
  279.  
  280. `-b'
  281.      Output only a Quick Renderman clip object.  Ignores -nBwhf.
  282.  
  283.  
  284.  
  285. 
  286. File: geomview  Node: Remote Display, Prev: RenderMan, Up: Mathematica, Next: Networked Geomview
  287.  
  288. Using Geomview and Mathematica on Different Computers
  289. =====================================================
  290.  
  291. It is possible to use Geomview to display graphics generated by
  292. Mathematica running on a different computer.  If each computer is either
  293. an SGI or a NeXT and they are networked together, you can tell
  294. Mathematica to use a remote host for Geomview graphics.  If you want to
  295. use Mathematica on a computer that is not networked with your Geomview
  296. computer, or on any kind of computer other than an SGI or a NeXT (for
  297. example a PC or a Mac), you can write out *chunk* files in
  298. Mathematica which you transfer to the Geomview computer and then
  299. translate to OOGL format.
  300.  
  301. * Menu:
  302.  
  303. * Networked Geomview::    Using a networked Geomview host.
  304. * Chunks::        Transporting Mathematica files to Geomview by Hand.
  305.  
  306. 
  307. File: geomview  Node: Networked Geomview, Prev: Remote Display, Up: Remote Display, Next: Chunks
  308.  
  309. Using a Networked Geomview Host
  310. -------------------------------
  311.  
  312. The `Geomview' command looks at the `DISPLAY' or
  313. `REMOTEHOST' environment variables to try to determine if you are
  314. logged in from another computer.  If either of these indicates that you
  315. are, `Geomview' will attempt to run Geomview on that
  316. computer.  In order for this to work, your network must be configured
  317. such that the Mathematica computer can successfully `rsh' to the
  318. Geomview computer without giving a password.
  319.  
  320. You can also explicitly set the `DisplayHost' option to the
  321. `Geomview' command to a string which is the desired hostname, for
  322. example:
  323.      In[1] := << OOGL.m
  324.  
  325.      In[2] := Plot3D[Sin[x + Sin[y]], {x,-2,2},{y,-2,2}]
  326.  
  327.      Out[2] := -Graphics3D-
  328.  
  329.      In[3] := Geomview[%3, DisplayHost->"riemann"] This displays the
  330. graphics `%3' on the remote host named `riemann'.
  331.  
  332. `Geomview' recognizes the string `"local"' as a value for
  333. `$DisplayHost'; it forces the graphics to be displayed on the local
  334. machine.
  335.  
  336. In addition to knowing the name of the machine you want to run Geomview
  337. on, the `Geomview' needs to know the type of that machine (SGI or NeXT).
  338. By default, `Geomview' assumes that it is the same kind of computer as
  339. the one you are running Mathematica on.  The `MachType' option lets you
  340. explicitly specify the type of the `DisplayHost' computer; it should be
  341. one of the strings `"sgi"' or `"next"'.
  342.  
  343. You can use `SetOptions' to change the default `DisplayHost'
  344. and `MachType'.  For example,
  345.      In[4] := SetOptions[Geomview, DisplayHost->"riemann",
  346. MachType->"sgi"] arranges for `Geomview' to run Geomview on an SGI
  347. workstation named `riemann'.
  348.  
  349. 
  350. File: geomview  Node: Chunks, Prev: Networked Geomview, Up: Remote Display, Next: Package Details
  351.  
  352. Transporting Mathematica Files to Geomview by Hand
  353. --------------------------------------------------
  354.  
  355. The auxilliary function `WriteChunk' is for those who can only use
  356. Mathematica on a non-Unix machine (Mac, PC) or a Unix machine that is
  357. not on a network with an SGI or NeXT.  `WriteChunk[FILE, GRAPHICS]'
  358. generates a file named FILE which contains the graphics object GRAPHICS
  359. in the format accepted by `math2oogl'.
  360.  
  361. You can transfer that file to a computer that has Geomview installed on
  362. it and then use the programs `math2oogl', `oogl2rib', and
  363. `geomview' directly from the shell.  These programs are distributed
  364. in the `bin/sgi' (on SGIs) or `bin/next' (on NeXTs)
  365. subdirectory of the Geomview directory, and may have been installed so
  366. that they are on your `path'. 
  367.  
  368.      In[1]:= <<OOGL.m
  369.  
  370.      In[2]:= Plot3D[ Sin[x + Sin[y]], {x,-2,2}, {y,-2,2} ]
  371.  
  372.      Out[2]= -SurfaceGraphics-
  373.  
  374.      In[3]:= WriteChunk["mychunk",%2]
  375. This writes the file `mychunk' which contains a description
  376. of the graphics object.  You can then transfer this file to an SGI or
  377. NeXT and type
  378.      math2oogl < mychunk > mma.oogl
  379. to convert it to the OOGL file `mma.oogl' which you can then view
  380. using Geomview. This is the equivalent of the `WriteOOGL' command. 
  381.  
  382. For a result equivalent to the `Geomview' or `Show'
  383. commands, type
  384.      math2oogl -togeomview Mathematica geomview < mychunk
  385.  
  386. The `WriteRIB' command can be emulated from the shell as
  387.      math2oogl < mychunk | oogl2rib -n mma.tiff
  388.  
  389.  
  390.  
  391.  
  392. 
  393. File: geomview  Node: Package Details, Prev: Chunks, Up: Mathematica, Next: Package Installation
  394.  
  395. Details of the Mathematica->Geomview Package
  396. ============================================
  397.  
  398. The `OOGL.m' package uses the external program `math2oogl' to
  399. convert `Graphics3D' objects to OOGL format, because a compiled
  400. external program is able to do this conversion many times faster than
  401. Mathematica.
  402.  
  403. The converter will sometimes handle colored SurfaceGraphics objects
  404. correctly that Mathematica does not handle correctly, which means that
  405. Geomview[object] sometimes works where Show[object] will give errors.
  406.  
  407. The converter supports the `Polygon', `Line', and `Point'
  408. graphics primitives, `RGBColor Graphics3D' directives, and
  409. `SurfaceGraphics' objects with or without `RGBColor'
  410. directives, and lists of any combination of these. It silently ignores
  411. all other directives.
  412.  
  413. The Mathematica to RenderMan conversion is actually a two-step process:
  414. Mathematica->OOGL (math2oogl), and OOGL->RenderMan (oogl2rib). The
  415. math2oogl program has only been tested on SGIs and NeXTs, but could
  416. theoretically compile on any machine. The oogl2rib program depends on
  417. the OOGL (Object Oriented Graphics Language) libraries, which now only
  418. exist on SGI and NeXT machines.
  419.  
  420. In the `WriteOOGL' and `WriteRIB' commands, filename can either be a
  421. string containing a filename, an `OutputStream' object, or a string
  422. starting with a `!' to send the output to a command.  Object can be a
  423. `Graphics3D' object, a `SurfaceGraphics' object, or a list of these.
  424.  
  425. The packages work best with Mathematica 2.0 or better.  With version 1.2,
  426. the Geomview display is always on the local host. 
  427.  
  428. 
  429. File: geomview  Node: Package Installation, Prev: Package Details, Up: Mathematica, Next: Installation
  430.  
  431. Installing the Mathematica Packages
  432. ===================================
  433.  
  434. If Geomview is properly installed on your system according to the
  435. instructions in *Note Installation::, then the Mathematica-to-Geomview
  436. packages should work as described here; there should be no need for
  437. additional installation procedures.  In practice, however, it is
  438. sometimes necessary to taylor the installation of the Mathematica
  439. packages and/or of Geomview itself to suit the needs of a particular
  440. system.  This section contains details about how the installation works;
  441. if the Mathematica-to-Geomview connection does not seem to work for you
  442. after following the Geomview installation procedure, consult this
  443. section to see what might need to be fixed.
  444.  
  445. In this section, the phrase *Geomview installation* refers any of
  446. the procedures in *Note Installation::.  The way the Mathematica packages
  447. work and are installed is the same regardless of whether you have
  448. one of the binary distributions or the source distribution.
  449.  
  450.  
  451.   1. The relevant mathematica files are `OOGL.m', `Geomview.m', and
  452.      `BezierPlot.m'; Mathematica must be able to find these files.  They
  453.      are distributed in the `$GEOMROOT/mathematica' subdirectory of the
  454.      binary distributions, and in the
  455.      `$GEOMROOT/src/bin/geomutil/math2oogl' subdirectory of the source
  456.      distribution.  These files need to be in a directory that is on
  457.      Mathematica's search path.  You can look at the value of the
  458.      `$Path' variable in a Mathematica session on your system to see a
  459.      list of the directories on Mathematica's search path.
  460.  
  461.      The Geomview installation procedure puts copies of the Mathematica
  462.      packages into a directory that you specify (`MMAPACKAGEDIR').  This
  463.      should ensure that Mathematica can find them.  Alternately, you could
  464.      arrange to append the pathname of the Mathmematica package subdirectory
  465.      of the Geomview distribution to the `$Path' variable each time you
  466.      run Mathematica.
  467.  
  468.   2. The package `OOGL.m' needs to be able to invoke the programs
  469.      `geomview', `math2oogl', and `oogl2rib'.  The Geomview
  470.      installation procedure installs these programs into a directory that you
  471.      specify for executables (`BINDIR').  Ideally, this directory should
  472.      be on your shell's `$path'.  More specifically, it should be on
  473.      the `$path' of the shell in which Mathematica runs; the directory
  474.      `/usr/local/bin' is usually a good choice.  You can see the list of
  475.      directories on this path by giving the command `!echo $path' in
  476.      Mathematica.
  477.  
  478.      If for some reason you can't arrange for `geomview',
  479.      `math2oogl', and `oogl2rib' to be in a directory on the
  480.      shell's `$path', you can modify `OOGL.m' to cause it to look
  481.      for them using absolute pathnames.  To do this, change the definitions
  482.      of the variables `$GeomviewPath' and `$GeomRoot', which are
  483.      defined near the top of the file.  Change `$GeomviewPath' to the
  484.      absolute pathname of the `geomview' shell script on your system.
  485.      Change `$GeomRoot' to the absolute pathname of the
  486.      `$GEOMROOT' directory on your system.  If you do this, you should
  487.      also make sure there are copies of `geomview', `math2oogl',
  488.      and `oogl2rib' in the `$GEOMROOT/bin/sgi' (on an SGI) or
  489.      `$GEOMROOT/bin/next' (on a NeXT) directory.
  490.  
  491.   3. The `geomview' shell script, which `OOGL.m' uses to invoke
  492.      Geomview, needs to be able to find the geomview executable file (which
  493.      is called `gvx' on the SGI and `Geomview.app/Geomview' on the
  494.      NeXT).  The Geomview installation procedure should have been taken care
  495.      of this, but if your Mathematica session doesn't seem to be able to
  496.      invoke Geomview, it's worth double-checking that the settings in the
  497.      `geomview' script are correct.
  498.  
  499.  
  500. 
  501. File: geomview  Node: Installation, Prev: Package Installation, Up: Top, Next: SGI Binary Installation
  502.  
  503. Installation
  504. ************
  505.  
  506. What you do to install Geomview depends on which kind of computer you
  507. have (SGI or NeXT) and on whether you have the source distribution or
  508. the binary distribution.
  509.  
  510. In general, if you don't care about looking at Geomview's source code,
  511. you should get the binary distribution.  Its installation is much easier
  512. and quicker than that for the source code.
  513.  
  514. * Menu:
  515.  
  516. * SGI Binary Installation::   Installing the SGI Binary Distribution.
  517. * NeXT Binary Installation::  Installing the NeXT Binary Distribution.
  518. * Source Code Installation::  Compiling and Installing the Source Code Distribution.
  519. * Obtaining::        Obtaining Geomview.
  520.  
  521. 
  522. File: geomview  Node: SGI Binary Installation, Prev: Installation, Up: Installation, Next: SGI Binary Detail
  523.  
  524. Installing the SGI Binary Distribution
  525. ======================================
  526.  
  527. If you have just obtained a copy of the SGI binary distribution (file
  528. `geomview-sgi.tar.Z'), you should be able to run Geomview and make
  529. use of most of its features immediately after unpacking it by
  530. `cd''ing to the directory that it is in and typing `geomview'.
  531.  
  532. In order to fully install Geomview so that you can run it from any
  533. directory and use all of its features, follow the steps in this section.
  534. In particular, you must go through this installation procedure in order
  535. to use Geomview to display Mathematica graphics.
  536.  
  537. Geomview is distributed in a directory that contains various files and
  538. subdirectories that Geomview needs at run-time, such as data files and
  539. external modules.  It also contains other things distributed with
  540. Geomview, such as documentation and (in the soure-code distribution)
  541. source-code.  We refer to the root directory of this tree as the
  542. `$GEOMROOT' directory.  This is the directory called `Geomview'
  543. that is created when you unpack the distribution file.
  544.  
  545. To install Geomview on your system, arrange for the `$GEOMROOT'
  546. directory to be in a permanent place.  Then, in a shell window,
  547. `cd' to that directory and type `install'.  This runs a shell
  548. script which does the installation after asking you several questions
  549. about where you want to install the various components of Geomview.
  550.  
  551. After running the `install' script you should now be able to run
  552. Geomview from any directory on your system.  (You may need to give the
  553. `rehash' command in any shells on your computer that were started
  554. up before you did the installation.)
  555.  
  556.  
  557. The `install' script puts copies of the files in
  558. `$GEOMROOT/bin/sgi' and `$GEOMROOT/man' into the directories
  559. you specified for executables and man pages, respectively.  Once you
  560. have done the installation you can cut down one the disk space required
  561. by Geomview by removing some files from these directories, since copies
  562. have been installed elsewhere.  You should first test that your
  563. installed Geomview works properly because once you remove these files
  564. from their distribution directories you will not be able to do the
  565. installation again.
  566.  
  567. In particular, the files you can remove are
  568.  
  569.  
  570. `$GEOMROOT/bin/sgi':
  571.      Remove all files from here except `gvx', which is the geomview
  572.      executable file.  DO NOT REMOVE `gvx'.  It is not installed
  573.      elsewhere.
  574.  
  575. `$GEOMROOT/man':
  576.      You can remove all the files in this directory.
  577.  
  578.  
  579.  
  580. 
  581. File: geomview  Node: SGI Binary Detail, Prev: SGI Binary Installation, Up: SGI Binary Installation, Next: NeXT Binary Installation
  582.  
  583. Details of the SGI Binary Installation
  584. --------------------------------------
  585.  
  586. The `install' script should be self-explanatory; just run it and
  587. answer the questions.  This section gives some details for system
  588. administrators and other users who may want to know more about the
  589. installation. 
  590.  
  591. The installation is actually done by `make'; the `install'
  592. script queries the user for the settings of the following `make'
  593. variables and then invokes `make install'.
  594.  
  595.  
  596. `GEOMROOT':
  597.      the absolute pathname of the Geomview root directory.  The
  598.      `geomview' shell script, which is what users invoke to run
  599.      Geomview, uses this to set various environment variables that Geomview
  600.      needs.  It is very important that this be an *absolute* pathname
  601.      --- i.e. it should start with a '/'.
  602.  
  603. `BINDIR':
  604.      a directory where executable files are installed.  The `geomview'
  605.      shell script goes here, as well as various other auxiliary programs that
  606.      can be used in conjunction with `geomview'.  This should be a
  607.      directory that is on users' `$path'.  These auxiliary programs are
  608.      distributed in the `$GEOMROOT/bin/sgi' directory; if you specify
  609.      this directory for `BINDIR', they are left in that directory.
  610.  
  611. `MANDIR':
  612.      a directory where Unix manual pages are installed.  These are
  613.      distributed in the `$GEOMROOT/man' subdirectory; if you specify
  614.      this directory for `MANDIR', they are left in that directory.
  615.  
  616. `MMAPACKAGEDIR':
  617.      a directory where Mathematica packages are installed.  This should be a
  618.      directory that Mathematica searches for packages that it loads; you can
  619.      see what directories your Mathematica searches by looking at the value
  620.      of the `$Path' variable in a Mathematica session.  The
  621.      installation process will install some packages there which allow you to
  622.      use Geomview to display Mathematica graphics.  These packages are
  623.      distributed in the `$GEOMROOT/mathematica' subdirectory; if you
  624.      specify this directory for `MMAPACKAGEDIR', or if you specify the
  625.      empty string for `MMAPACKAGEDIR', the packages are left in that
  626.      directory.  For more details about the way these Mathematica packages
  627.      connect to Geomview, *Note Package Installation::.
  628.  
  629.  
  630. 
  631. File: geomview  Node: NeXT Binary Installation, Prev: SGI Binary Detail, Up: Installation, Next: NeXTStep Binary Detail
  632.  
  633. Installing the NeXT Binary Distribution
  634. =======================================
  635.  
  636.  
  637.   1. If you have just obtained a copy of the NeXTStep binary distribution
  638.      (file `geomview-next.tar'), you can unpack it by double-clicking on
  639.      it in the Workspace.  This will open up a File Viewer panel showing,
  640.      among other things, a NeXT Installer package called `Geomview.pkg'.
  641.  
  642.  
  643.   2. The first thing you should do is double-click on `Geomview.pkg' to
  644.      invoke the NeXT Installer.  You will be asked where you want to install
  645.      it; typically it should go in `/LocalApps' or in `~/Apps' in
  646.      your home directory.  You should now be able to run Geomview and make
  647.      use of most of its features by double-clicking on the installed
  648.      `Geomview.app' icon.
  649.  
  650.   3. There are some aspects of the installation, however, that the NeXT
  651.      Installer can't handle.  In order to fully install Geomview so that you
  652.      can use all of its features, you should run the `install' script in
  653.      the `Geomview.app' directory. In particular, you must go through
  654.      this installation procedure in order to use Geomview to display
  655.      Mathematica graphics.
  656.  
  657.      To run the `install' script you can open `Geomview.app' in the
  658.      Workspace by selecting it and picking `File->Open as Folder' from
  659.      the Workspace menu.  This will pop up a File Viewer panel showing the
  660.      contents of `Geomview.app'.  Scroll down to the file named
  661.      `install', and double-click on it.  This will open a terminal
  662.      window and run the script in that window.  Alternately, you can open a
  663.      terminal window yourself, cd to `Geomview.app', and run
  664.      `install' there.
  665.  
  666.      The `install' script does the installation after asking you several
  667.      questions about where you want to install the various components of
  668.      Geomview.  After running the `install' script, Geomview is
  669.      completely installed.  If in the future you move `Geomview.app' to
  670.      some other location you should run `install' again.
  671.  
  672.   4. This step is optional.  Geomview's example data files are in the
  673.      `Geomview.app/data' directory.  If you are on a network with both
  674.      SGI workstations and NeXTStep workstations, and you want to install
  675.      Geomview to run on both, you can save disk space by having the two
  676.      installations share a common data directory.  To do this, decide on a
  677.      location for the data directory and copy it there if it isn't there
  678.      already (a good choice would be to leave it in the `$GEOMROOT'
  679.      directory in your SGI Geomview installation).  Then edit the file
  680.      `Geomview.app/CONFIG.gv' to change the setting of the variable
  681.      `GEOMVIEW_DATA' to point to this directory (there are comments in
  682.      the file telling you what to do).  You can then remove the data
  683.      directory from `Geomview.app'.
  684.  
  685.  
  686. To run geomview, double-click on `Geomview.app' from the workspace,
  687. or type `open Geomview.app' from the appropriate directory, or type
  688. `geomview' from a shell window.
  689.  
  690. More Geomview documentation is in the `Geomview.app/doc'
  691. subdirectory.  In particular, a copy of the manual is there.
  692.  
  693. The `install' script puts copies of the files in
  694. `Geomview.app/bin/next' and `Geomview.app/man' into the
  695. directories you specified for executables and man pages, respectively.
  696. Once you have done the installation you can cut down one the disk space
  697. required by Geomview by removing all the files in these directories,
  698. since copies have been installed elsewhere.  You should first test that
  699. your installed Geomview works properly because once you remove these
  700. files from their distribution directories you will not be able to do the
  701. installation again.
  702.  
  703. 
  704. File: geomview  Node: NeXTStep Binary Detail, Prev: NeXT Binary Installation, Up: NeXT Binary Installation, Next: Source Code Installation
  705.  
  706. Details of the NeXTStep Binary Installation
  707. -------------------------------------------
  708.  
  709. Other than the installation of the `Geomview.app' directory, the
  710. installation details of the NeXTStep binary distribution are the same as
  711. for the SGI distribution, *Note SGI Binary Detail::.  Note that the
  712. directory referred to in the SGI distribution as `$GEOMROOT'
  713. is the `Geomview.app' directory in the NeXTStep distribution.
  714.  
  715. 
  716. File: geomview  Node: Source Code Installation, Prev: NeXTStep Binary Detail, Up: Installation, Next: Obtaining
  717.  
  718. Compiling and Installing the Source Code Distribution
  719. =====================================================
  720.  
  721. The main reason to get the source code distribution is to look at and/or
  722. work with the source code.  If you are only concered with *using*
  723. Geomview it is better to get the binary distribution.  It takes anywhere
  724. from 15 minutes to 1.5 hours to compile the entire source distribution,
  725. depending on what kind of computer you have.
  726.  
  727. Let `$GEOMROOT' denote the full pathname of the Geomview source
  728. code directory; this is the directory called `Geomview' that is
  729. created when you unpack the distribution.  This directory contains the
  730. Geomview source code as well as various other files and subdirectories
  731. that Geomview needs when it runs.
  732.  
  733. Before doing any compilation you should edit the file
  734. `$GEOMROOT/makefiles/mk.site.default'.  This file defines some
  735. `make' variables which specify your local configuration.  This
  736. includes the pathnames of the directories into which Geomview will be
  737. installed, and possibly some other settings as well.  There are comments
  738. in the file telling you what to do.  This file is included by every
  739. Makefile in the source tree, so the settings you specify here are used
  740. throughout the source.
  741.  
  742. If you will be compiling for both SGI and NeXT, you can do both in the
  743. same directory tree.  By default the Makefiles are set up to put the
  744. objects files, libraries, and executables in directories which depend on
  745. the type of computer, so the two architectures will not interfere with
  746. each other.  The Makefiles use a variable called `CPU' to determine
  747. the type of machine. Before doing any compilation you must arrange for
  748. this variable to have a value.  There are two ways you can do this.
  749.  
  750.  
  751.   1. If you will always be compiling Geomview on the same type of computer
  752.      (SGI or NeXT), edit the file `$GEOMROOT/makefiles/Makedefs.global'
  753.      to set the `CPU' variable to either `iris4' or `NeXT'.
  754.      The comments near the top of that file will tell you where to do this.
  755.  
  756.   2. If you will be compiling on both types of computers you can set a shell
  757.      environment variable named `CPU' to either `iris4' or
  758.      `NeXT', and the Makefiles will inherit the value from the
  759.      environment.  The script `$GEOMROOT/config' determines which kind
  760.      of computer you are on and sets this variable accordingly.  To use this
  761.      script, type `source config' in the (assuming a C-shell type shell)
  762.      in the `$GEOMROOT' directory shell in which you plan to do the
  763.      compilation.  Or you can set the variable directly; it should be either
  764.      `NeXT' or `iris4'.  You will need to do this in every shell in
  765.      which you plan to do compilation.
  766.  
  767.      Alternately, you could modify your shell initialization file
  768.      (`.cshrc' or whatever) to set `CPU' appropriately.
  769.  
  770.  
  771. Note that many of the Makefiles refer to a variable called `MACHTYPE'
  772. to determine the type of machine.  This is set to either `sgi' or
  773. `next', depending on the value of `CPU'.
  774.  
  775. Once you have configured your source tree by editing the files as
  776. described above and setting the `CPU' variable, you can compile and
  777. install Geomview by typing `make install' in the `$GEOMROOT'
  778. directory.  You can also type `make all', or equivalently just
  779. `make', to compile without installing, and then type `make
  780. install' later to install.
  781.  
  782. You can use these same `make' comands in any subdirectory in the
  783. tree to recompile and/or install a part of Geomview or a module.
  784.  
  785. If you want to compile fat binaries under NeXTStep 3.1, before doing any
  786. compilation edit the file `$GEOMROOT/makefiles/mk.next' to
  787. uncomment a particular line there.  There are comments in the file
  788. telling you which line to uncomment.
  789.  
  790. If you want to modify the complier flags used during compilation, edit
  791. the file `$GEOMROOT/makefiles/Makedefs.global'; the `COPTS'
  792. variable specifies the flags passed to the C compiler (cc).
  793.  
  794. 
  795. File: geomview  Node: Obtaining, Prev: Source Code Installation, Up: Installation, Next: Function Index
  796.  
  797. Obtaining Geomview
  798. ==================
  799.  
  800. Geomview is available free via anonymous ftp from Internet host
  801. `geom.umn.edu', IP address 128.101.25.35.  The Geomview
  802. distribution files are in the `pub/software/geomview' subdirectory.
  803. They are all tar archive files (`.tar' or `.tar.Z' files), so
  804. you should use binary mode in ftp for transferring them to your site.
  805.  
  806. The main files are
  807.  
  808.  
  809. `geomview-sgi.tar.Z'
  810.      The SGI binary distribution. Contains executables for running
  811.      on any Silcon Graphics IRIS workstation, plus documentation
  812.      and example files.
  813.  
  814. `geomview-next.tar'
  815.      The NeXTStep binary distribution.  This contains fat binaries which
  816.      will run on either a NeXT workstation running NeXTStep 3.0 or 3.1,
  817.      or a 486 PC running NeXTStep 3.1.  Also contains documentation and
  818.      example files.  This {.tar} file is not compressed because it
  819.      contains the distribution compressed into a NeXT Installer package,
  820.      and further compression actually increases the size of the file.
  821.      To unpack `geomview-next.tar' on a NeXT, simple double-click on it
  822.      in the Workspace.
  823.  
  824. `geomview-src.tar.Z'
  825.      The source code distribution; contains source code so you can compile
  826.      Geomview and the distributed external modules on either an SGI or on a
  827.      NeXT workstation running NeXTStep 3.0 or 3.1, or a 486 PC running
  828.      NeXTStep 3.1.  Also contains documentaion and examples files.
  829.  
  830.  
  831. Each of the above archive files contains the entire distribution:
  832. executables or source for Geomview itself, plus all distributed external
  833. modules, example data files, and documentation.  These archive files are
  834. therefore rather large.  If you do not have enough disk space on your
  835. workstation for the entire distribution, various pieces of the
  836. distribution are available separately in the
  837. `pub/software/geomview/pieces' subdirectory.  See the file
  838. `README' in that directory for details.
  839.  
  840. After retrieving any of the distribution archive files, you can
  841. unpack it with a command like the following
  842.      % uncompress < geomview-sgi.tar.Z | tar xvopBf -
  843. This will unpack the contents of the archive file into
  844. a subdirectory named `Geomview'.  Once unpacked, you
  845. can delete the archive file.
  846.  
  847. The following is a sample ftp session for retreiving and unpacking the
  848. SGI binary distribution.  After unpacking, see the file `README'
  849. for more information.
  850.  
  851.      artin% ftp geom.umn.edu
  852.      Connected to geom.umn.edu.
  853.      220 cameron FTP server (Version 5.88 Thu Jun 25 16:41:41 CDT 1992) ready.
  854.      Name (geom.umn.edu:mbp): anonymous
  855.      331 For password please enter your e-mail address or name and institution.
  856.      Password:mbp@geom.umn.edu
  857.  
  858.      230 Guest login ok, access restrictions apply.
  859.      ftp> cd pub/software/geomview
  860.      250 CWD command successful.
  861.      ftp> binary
  862.      200 Type set to I.
  863.      ftp> get geomview-sgi.tar.Z
  864.      200 PORT command successful.
  865.      150 Opening BINARY mode data connection for geomview-sgi.tar.Z (5815980 bytes).
  866.      226 Transfer complete.
  867.      local: geomview-sgi.tar.Z remote: geomview-sgi.tar.Z
  868.      5815980 bytes received in 28.67 seconds (1.98e+02 Kbytes/s)
  869.      ftp> quit
  870.      221 Goodbye.
  871.      artin% ls -l
  872.      total 5680
  873.      -rw-rw-r--  1 mbp      5815980 Aug 19 16:38 geomview-sgi.tar.Z
  874.      artin% uncompress < geomview-sgi.tar.Z | tar xvopf -
  875.      x ./CHANGES, 16910 bytes, 34 tape blocks
  876.      ...
  877.      artin% rm geomview-sgi.tar.Z
  878.  
  879.  
  880. 
  881. File: geomview  Node: Function Index, Prev: Obtaining, Up: Top
  882.  
  883. Function Index
  884. **************
  885.  
  886.  
  887. * Menu:
  888.  
  889. * !: Gcl Reference.
  890. * <: Gcl Reference.
  891. * =: Gcl Reference.
  892. * >: Gcl Reference.
  893. * ?: Gcl Reference.
  894. * ??: Gcl Reference.
  895. * |: Gcl Reference.
  896. * all: Gcl Reference.
  897. * ap-override: Gcl Reference.
  898. * backcolor: Gcl Reference.
  899. * background-image: Gcl Reference.
  900. * bbox-color: Gcl Reference.
  901. * bbox-draw: Gcl Reference.
  902. * camera: Gcl Reference.
  903. * camera-draw: Gcl Reference.
  904. * camera-prop: Gcl Reference.
  905. * camera-reset: Gcl Reference.
  906. * car: Gcl Reference.
  907. * cdr: Gcl Reference.
  908. * clock: Gcl Reference.
  909. * command: Gcl Reference.
  910. * copy: Gcl Reference.
  911. * cursor-still: Gcl Reference.
  912. * cursor-twitch: Gcl Reference.
  913. * delete: Gcl Reference.
  914. * dice: Gcl Reference.
  915. * dimension: Gcl Reference.
  916. * dither: Gcl Reference.
  917. * draw: Gcl Reference.
  918. * echo: Gcl Reference.
  919. * emodule-clear: Gcl Reference.
  920. * emodule-define: Gcl Reference.
  921. * emodule-defined: Gcl Reference.
  922. * emodule-isrunning: Gcl Reference.
  923. * emodule-path: Gcl Reference.
  924. * emodule-run: Gcl Reference.
  925. * emodule-sort: Gcl Reference.
  926. * emodule-start: Gcl Reference.
  927. * emodule-transmit: Gcl Reference.
  928. * escale: Gcl Reference.
  929. * event-keys: Gcl Reference.
  930. * event-mode: Gcl Reference.
  931. * event-pick: Gcl Reference.
  932. * evert: Gcl Reference.
  933. * exit: Gcl Reference.
  934. * ezoom: Gcl Reference.
  935. * freeze: Gcl Reference.
  936. * geometry: Gcl Reference.
  937. * geomview-version: Gcl Reference.
  938. * hdefine: Gcl Reference.
  939. * help: Gcl Reference.
  940. * hmodel: Gcl Reference.
  941. * hsphere-draw: Gcl Reference.
  942. * if: Gcl Reference.
  943. * inhibit-warning: Gcl Reference.
  944. * input-translator: Gcl Reference.
  945. * interest: Gcl Reference.
  946. * lines-closer: Gcl Reference.
  947. * load: Gcl Reference.
  948. * load-path: Gcl Reference.
  949. * look: Gcl Reference.
  950. * look-encompass: Gcl Reference.
  951. * look-encompass-size: Gcl Reference.
  952. * look-recenter: Gcl Reference.
  953. * look-toward: Gcl Reference.
  954. * merge: Gcl Reference.
  955. * merge-ap: Gcl Reference.
  956. * merge-base-ap: Gcl Reference.
  957. * merge-baseap: Gcl Reference.
  958. * morehelp: Gcl Reference.
  959. * name-object: Gcl Reference.
  960. * ND-axes: Gcl Reference.
  961. * ND-color: Gcl Reference.
  962. * ND-xform: Gcl Reference.
  963. * ND-xform-get: Gcl Reference.
  964. * new-alien: Gcl Reference.
  965. * new-camera: Gcl Reference.
  966. * new-center: Gcl Reference.
  967. * new-geometry: Gcl Reference.
  968. * new-reset: Gcl Reference.
  969. * NeXT: Gcl Reference.
  970. * normalization: Gcl Reference.
  971. * pick: Gcl Reference.
  972. * pickable: Gcl Reference.
  973. * pick-invisible: Gcl Reference.
  974. * position: Gcl Reference.
  975. * position-at: Gcl Reference.
  976. * position-toward: Gcl Reference.
  977. * progn: Gcl Reference.
  978. * quit: Gcl Reference.
  979. * quote: Gcl Reference.
  980. * rawevent: Gcl Reference.
  981. * rawpick: Gcl Reference.
  982. * read: Gcl Reference.
  983. * real-id: Gcl Reference.
  984. * redraw: Gcl Reference.
  985. * regtable: Gcl Reference.
  986. * rehash-emodule-path: Gcl Reference.
  987. * replace-geometry: Gcl Reference.
  988. * rib-display: Gcl Reference.
  989. * rib-snapshot: Gcl Reference.
  990. * scale: Gcl Reference.
  991. * scene: Gcl Reference.
  992. * set-clock: Gcl Reference.
  993. * set-conformal-refine: Gcl Reference.
  994. * set-emodule-path: Gcl Reference.
  995. * setenv: Gcl Reference.
  996. * set-load-path: Gcl Reference.
  997. * set-motionscale: Gcl Reference.
  998. * sgi: Gcl Reference.
  999. * shell: Gcl Reference.
  1000. * sleep-for: Gcl Reference.
  1001. * sleep-until: Gcl Reference.
  1002. * snapshot: Gcl Reference.
  1003. * soft-shader: Gcl Reference.
  1004. * space: Gcl Reference.
  1005. * stereowin: Gcl Reference.
  1006. * time-interests: Gcl Reference.
  1007. * transform: Gcl Reference.
  1008. * transform-incr: Gcl Reference.
  1009. * transform-set: Gcl Reference.
  1010. * ui-center: Gcl Reference.
  1011. * ui-emotion-program: Gcl Reference.
  1012. * ui-emotion-run: Gcl Reference.
  1013. * ui-freeze: Gcl Reference.
  1014. * ui-panel: Gcl Reference.
  1015. * ui-target: Gcl Reference.
  1016. * uninterest: Gcl Reference.
  1017. * update: Gcl Reference.
  1018. * update-draw: Gcl Reference.
  1019. * window: Gcl Reference.
  1020. * winenter: Gcl Reference.
  1021. * write: Gcl Reference.
  1022. * write-comments: Gcl Reference.
  1023. * write-sexpr: Gcl Reference.
  1024. * xform: Gcl Reference.
  1025. * xform-incr: Gcl Reference.
  1026. * xform-set: Gcl Reference.
  1027. * zoom: Gcl Reference.
  1028.  
  1029.  
  1030.  
  1031. 
  1032.